package Y2024.M11.D26;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2024-11-26
 * Time: 9:57
 */
public class Main {
    public static void main(String[] args) {

    }
    //是否为文件
    static boolean isFile(File file){
        return file.isFile();
    }
    //是否为文件夹
    static boolean isDirectory(File file){
        return file.isDirectory();
    }
    //创建文件
    static File makeFile(){
        File file=new File("1.txt");
        file.mkdir();
        return file;
    }
    //创建文件夹
    static File makeDirectory() throws IOException {
        File file=new File("D:/stories/");
        file.createNewFile();
        return file;
    }
    //统计长度
    static long count(File file){
        return file.length();
    }
    //使用循环，更新文件名
    static void reName(){

    }
}
